package com.smart.common.base.exception;

import com.smart.common.base.result.ResultCode;
import lombok.Getter;

/**
 * 持久化对象      PO
 * 请求参数查询对象 QO
 * 视图对象        VO
 * 系统的异常  message
 * 错误的message
 * 错误的 业务状态
 */
@Getter
public class BaseException extends RuntimeException {
    private int status;
    private String msg;
    private ResultCode responseCode;

    public BaseException(ResultCode responseCode) {
        this.status = responseCode.getRetCode();
        this.msg = responseCode.getRetMsg();
        this.responseCode = responseCode;
    }
}
